package com.itheima.controller;/*
 * @author  xs
 * @date 2022/1/16 0:35
 * @Version  1.0
 * */

import com.itheima.manager.BlackUserManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BlackUserController {
    @Autowired
    private BlackUserManager blackUserManager;

    @GetMapping("/findAllUser")

    public ResponseEntity findAllUser(
            @RequestParam(defaultValue = "1") Integer page,
            @RequestParam(defaultValue = "10")  Integer pagesize){
        System.out.println("访问成功！！");
        return  blackUserManager.findAllUser(page,pagesize);

    }

    @GetMapping("/user/locale")
    public ResponseEntity locale(Long   uid){

        System.out.println("访问成功！！"+uid);
        return  blackUserManager.findUserlocale(uid);

    }
    @GetMapping("test")
    public String test(){
        return  "1233";
    }
}
